package Interview;

import java.util.Map;
import java.util.Scanner;

/**
 * Created by loso on 2017/3/25.
 */
public class _neteasy_2017325Test3 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();
        int[] nums = new int[n];
        for (int i = 0; i < n; i++) {
            nums[i] = in.nextInt();
        }
        int num0;
        for (int i = 0; i < k; i++) {
            num0 = nums[0];
            move(nums,num0);
            for (int j = 0; j < n-1; j++) {
                System.out.print(nums[j] + " ");
            }
            System.out.println(nums[n-1]);
        }


        for (int i = 0; i < n-1; i++) {
            System.out.print(nums[i] + " ");
        }
        System.out.println(nums[n-1]);
    }

    private static void move(int[] nums, int num0){
        for (int i = 0; i < nums.length - 1; i++) {
            nums[i] =(nums[i] + nums[i+1]) % 100;
        }
        nums[nums.length - 1] = (nums[nums.length - 1] + num0) %100;
    }
}
